import Vue from 'vue'
function period(idCardTime) {
	var date = new Date(idCardTime.split("-")[1].split(".").join("/")).getTime()
	if((date-nowTime())>0){
		return true
	}else{
		return false
	}
}
function nowTime(){
	var now = new Date()
	var y = now.getFullYear()
	var m = now.getMonth() + 1
	var d = now.getDate()
	var c = y + "/" + (m < 10 ? "0" + m : m) + "/" + (d < 10 ? "0" + d : d)
	return new Date(c).getTime()
}
//内容部分变为*
function filterEncrypt(res,v1,v2){
	let b=res.slice(v1,(v2-0+1))
	let c=""
	for(let i=0;i<b.length;i++){
		c+='*'
	}
	return res.replace(b,c)
}
Vue.filter('filterEncrypt',filterEncrypt)
//过滤器
export {
	period
}
